package com.fastloan.mgt.application.base.service;

import com.fastloan.common.model.CheckResult;
import com.fastloan.mgt.application.base.model.ApplicationIPC;
import com.fastloan.mgt.application.base.model.ApplicationValue;
import com.kawins.base.BaseService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @author yanwe
 * createTime 2017-11-2017/11/8 13:38
 */
public interface ApplicationIPCService extends BaseService<ApplicationValue>{

    List<ApplicationIPC> selectApplicationIPCNoTree(String applicationId);

    List<ApplicationIPC> selectApplicationIPC(String applicationId);

    List<ApplicationIPC> selectApplicationIPC(String applicationId, Integer type);

    /**
     * 根据产品获得IPC信息 (包含客户上次填写的IPC信息)
     *
     * @param productId 产品ID
     * @param type 类型 0 客户 1 客户经理
     * @param customerId 客户ID
     * @return IPC
     */
    List<ApplicationIPC> selectProductIPC(String productId, Integer type,String customerId);

    /**
     * 根据产品获得IPC信息
     *
     * @param productId 产品ID
     * @param type 类型 0 客户 1 客户经理
     * @return IPC
     */
    List<ApplicationIPC> selectProductIPC(String productId, Integer type);

    boolean addIPC(List<ApplicationValue> applicationValueList);

    CheckResult updateIPC(ApplicationValue applicationValue, String remark);

    ApplicationValue uploadIPCFile(String applicationIpcId, MultipartFile[] files);

    ApplicationValue deleteFile(String applicationIpcId, String fileId);

    Map<String, List<String>> queryFileIds(String applicationId);


}
